package com.zyg.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zyg.pojo.User;
import com.zyg.service.UserService;

@Controller
public class UserController {
	@Autowired
	private UserService userService;
	
	@RequestMapping("/login.action")
	public String login(User user ){
		boolean flag = userService.login(user);
		if (flag) {
			return "redirect:/showHouse.action";
		}else {
			return "login";
		}
	}

}
